package com.ims.core.doc.service.impl;

import java.util.List;
import com.ims.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ims.core.doc.mapper.TInNon1002Mapper;
import com.ims.core.doc.domain.TInNon1002;
import com.ims.core.doc.service.ITInNon1002Service;

/**
 * 火车票Service业务层处理
 *
 * @author IMS
 * @date 2024-11-20
 */
@Service
public class TInNon1002ServiceImpl implements ITInNon1002Service
{
    @Autowired
    private TInNon1002Mapper tInNon1002Mapper;

    /**
     * 查询火车票
     *
     * @param id 火车票主键
     * @return 火车票
     */
    @Override
    public TInNon1002 selectTInNon1002ById(Long id)
    {
        return tInNon1002Mapper.selectTInNon1002ById(id);
    }

    /**
     * 查询火车票列表
     *
     * @param tInNon1002 火车票
     * @return 火车票
     */
    @Override
    public List<TInNon1002> selectTInNon1002List(TInNon1002 tInNon1002)
    {
        return tInNon1002Mapper.selectTInNon1002List(tInNon1002);
    }

    /**
     * 新增火车票
     *
     * @param tInNon1002 火车票
     * @return 结果
     */
    @Override
    public int insertTInNon1002(TInNon1002 tInNon1002)
    {
        tInNon1002.setCreateTime(DateUtils.getNowDate());
        return tInNon1002Mapper.insertTInNon1002(tInNon1002);
    }

    /**
     * 修改火车票
     *
     * @param tInNon1002 火车票
     * @return 结果
     */
    @Override
    public int updateTInNon1002(TInNon1002 tInNon1002)
    {
        tInNon1002.setUpdateTime(DateUtils.getNowDate());
        return tInNon1002Mapper.updateTInNon1002(tInNon1002);
    }

    /**
     * 批量删除火车票
     *
     * @param ids 需要删除的火车票主键
     * @return 结果
     */
    @Override
    public int deleteTInNon1002ByIds(Long[] ids)
    {
        return tInNon1002Mapper.deleteTInNon1002ByIds(ids);
    }

    /**
     * 删除火车票信息
     *
     * @param id 火车票主键
     * @return 结果
     */
    @Override
    public int deleteTInNon1002ById(Long id)
    {
        return tInNon1002Mapper.deleteTInNon1002ById(id);
    }
}
